package File;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class demo10 {
    public static void main(String[] args) {
        try(Reader reader=new FileReader("./maybe.text")){
            while(true){
                 char[] chars=new char[1];
            int n=reader.read(chars);
            if(n==-1){
                //break只能在循环或者switch里面使用
//              break;
               break;
            }
                System.out.println(n);
            for(int i=0;i<n;i++){
                System.out.println(chars[i]);
            }
            }

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
